import style from "./index.module.scss";
import Banner from "~/Banner";
// import service from "@/utils/service";
import axios  from "axios";
import service from "@/utils/service";

function Home() {

  function getData(){
    service.get("/artist/list?cat=1001")
    .then(res=>{
      console.log("res.data",res.data);      
    })

    // axios.get("http://localhost:8002/api/artist/list?cat=1001");

  }

  return (
    <>
      <div className={style.box}>
        <header className={style.header}>
            <img src="./favicon.ico" />
            <img src={require("../../assets/favicon.ico")} alt="" />
            头部
            <Banner></Banner>
        </header>
        <main className={style.main}>
          主要内容区
          <div className={style.title}>标题</div>
          <div className={style.list}>列表</div>
          <div className={style.goods}>商品</div>
          <div className={style.price}>价格</div>
          <ul className={style.listbox}>
            <li >第一行</li>
            <li >第二行</li>
            <li >第三行</li>
          </ul>
          <input type="button" value="获取数据" onClick={getData} />
        </main>
        <footer className={style.footer}>底部 </footer>
      </div>
    </>
  );
}

export default Home;
